package day017.lambda;

public class LambdaDemo {
    public static void main(String[] args) {
        goSwimming(new Swimming() {
            @Override
            public void swim() {
                System.out.println("铁汁，我们去游泳吧...");
            }
        });

        goSwimming(() -> System.out.println("铁汁，我们去游泳吧..."));
    }

    public static void goSwimming(Swimming swimming) {
        swimming.swim();
    }
}
